<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Home extends CI_Controller {

	public $layout = 'default';
	
	public function __construct (){
		
		parent::__construct();
		$this->load->library(array('restrict_page','form_validation','session'));
		$this->load->helper('url');

	}
	
	public function index(){

		$data['titulo'] = 'Home';
		
		$this->load->model('Usuario_model','',TRUE);
		$data['qtd_usuarios'] = $this->Usuario_model->count_all();
		
		$this->load->model('Noticia_model','',TRUE);
		$data['qtd_noticias'] = $this->Noticia_model->count_all();
		
		$this->load->view('home', $data);
		
	}
		
}
